﻿@using System.Drawing
@using SelfMadeMillionaire.Web.Infrastructure
@model SelfMadeMillionaire.Web.Infrastructure.ViewModels.EmailSend.EmailSendView
@{
    ViewBag.Title = "Send New Email";
    
	Layout = "~/Areas/Admin/Views/Shared/_AdminLayout.cshtml";
}

@using (Html.BeginForm("Index", "EmailSend", FormMethod.Post, new { @class = "form-horizontal", enctype = "multipart/form-data"}))
{
	@Html.HiddenFor(m=>m.ID)
    @Html.HiddenFor(m=>m.CreationDate)
    @Html.HiddenFor(m=>m.Status)
    @Html.ValidationSummary(null, new {@style = "color: red" })
   <div class="table-responsive">
       <table width="100%" border="0" cellspacing="0" cellpadding="0" class="newsletter_seach_form">
           <tbody>
               <tr style="height: 50px" >
                   <td width="20%">@Html.LabelFor(m => m.SendTo)</td>
                   <td width="80%">
                       <table>
                           <tr>
                               <td width="14%">
                                   @Html.LabelFor(m => m.IsFreeSubscribers)
                               </td>
                               <td width="5%">
                                   @Html.CheckBoxFor(m => m.IsFreeSubscribers)
                               </td>
                               <td width="6%">
                                   @Html.LabelFor(m => m.IsSilver)
                               </td>
                               <td width="5%">
                                   @Html.CheckBoxFor(m => m.IsSilver)
                               </td>
                               <td width="5%">
                                   @Html.LabelFor(m => m.IsGold)
                               </td>
                               <td width="5%">
                                   @Html.CheckBoxFor(m => m.IsGold)
                               </td>
                               <td width="8%">
                                   @Html.LabelFor(m => m.IsPlatinum)
                               </td>
                               <td width="5%">
                                   @Html.CheckBoxFor(m => m.IsPlatinum)
                               </td>
                               <td width="30%"> </td>
                           </tr>
                       </table> 
                   </td>
               </tr>
               <tr>
                    <td></td>
                    <td><hr style="border-top: 1px solid black!important"/> </td>
                </tr>
               <tr style="height: 50px">
                   <td width="20%"> @Html.LabelFor(m => m.AdditRecipients)</td>
                   <td width="80%"> @Html.TextAreaFor(m => m.AdditRecipients, new { rows= 2, style = "width:100%; resize: none;", @class = "form-control"})</td>
               </tr>
               <tr>
                    <td></td>
                    <td><hr style="border-top: 1px solid black!important"/> </td>
                </tr>
               <tr style="height: 50px">
                   <td width="12%"> @Html.LabelFor(m => m.Subject)</td>	
                   <td width="20%"> @Html.TextBoxFor(x => x.Subject, new {style = "width: 100%", @class = "form-control"})</td>
               </tr>
           </tbody>
       </table>
       <hr style="border-top: 1px solid black!important"/>
        <div style="border-width: 2px!important; border: 0 solid #9e9e9e">
            @Html.TextAreaFor(model => model.Body, new { rows = 10, cols = 10, @class = "form-control" })
        </div>
        
    </div>
   
    <br/>
	<div class="row">
		<div class="col-sm-12">
			<div class="pull-left">
				<button type="submit" class="btn btn-default">Send Email</button>
				<a href="@Url.Action("Index")" class="btn btn-default">Discard Email</a>
			</div>
		</div>
	</div>
}

<script type="text/javascript">
	tinymce.init({
		selector: "#@Html.IdFor(m => m.Body)",
	    plugins: "image link code fullpage"
});
    
</script>
